home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / libs / sphigs / sph_quik.lha / quickdraw / man / qd_calls next >
Encoding:
Text File  |  1989-12-09  |  4.3 KB  |  133 lines

  1.  
  2. QuickDraw                                             
  3. ================================================================
  4.  
  5. What follows is a list of all valid QuickDraw calls.  They are
  6. listed in groups that perform similar functions.  Some notes 
  7. follow the listing.
  8.  
  9.  
  10. Main Calls:      (Explained below)
  11.  
  12.    PROCEDURE InitDraw(width, height : integer);
  13.    PROCEDURE InitDraw4(width, height, x, y : integer);
  14.    PROCEDURE ClearAll;
  15.    PROCEDURE GetDrawingRect(VAR sizeOfWindow : Rect);
  16.    PROCEDURE DrawGrid(spacing : integer);
  17.    PROCEDURE QuitDraw;
  18.  
  19.  
  20. Calculation Calls:
  21.  
  22.    PROCEDURE SetPt(VAR pointToSet : Point; x, y :  integer);
  23.    PROCEDURE SetRect(VAR rectToSet : Rect; left, top, right, bot : integer);
  24.    PROCEDURE OffsetRect(VAR rectToOffset : Rect; dh, dv : integer);
  25.    PROCEDURE InsetRect(VAR rectToInset : Rect; dh, dv : integer);
  26.    FUNCTION  PtInRect(checkPoint : Point; checkRect : Rect): boolean;
  27.  
  28.  
  29. Color Calls:
  30.  
  31.    PROCEDURE SetColor(colorToSet : integer);
  32.       Valid Colors:  whiteColor, blackColor, redColor, greenColor, 
  33.                      blueColor, magentaColor, cyanColor, yellowColor
  34.       Example:  SetColor( whiteColor );
  35.    PROCEDURE PenPat(pattern : integer);
  36.       Valid Patterns: gray, ltGray, dkGray, black
  37.       Other Patterns: white
  38.       Note: NEVER use white.
  39.       Example:  PenPat( gray );
  40.  
  41.  
  42. Miscellaneous Calls:
  43.  
  44.    FUNCTION  Random : integer;
  45.    PROCEDURE Randomize(seed : integer);
  46.    PROCEDURE WaitDraw(seconds : integer);
  47.  
  48.  
  49. Query Calls:
  50.  
  51.    FUNCTION  Button : boolean;
  52.    PROCEDURE GetMouse(VAR x, y : integer)
  53.    PROCEDURE GetMousePt(VAR pt : Point)
  54.  
  55.  
  56. Setting Calls:
  57.  
  58.    PROCEDURE SetLineWidth(lineWidth : integer);
  59.    PROCEDURE GetLineWidth(VAR lineWidth : integer);
  60.    PROCEDURE SetLineStyle(style : integer);
  61.    PROCEDURE GetLineStyle(VAR : integer);
  62.       Valid Line Styles:  LINE_STYLE__SOLID, LINE_STYLE__ON_OFF_DASH, 
  63.                           LINE_STYLE__DOUBLE_DASH   
  64.       Example:  SetLineStyle( LINE_STYLE__SOLID );
  65.  
  66.    PROCEDURE PenMode(mode : integer);
  67.    PROCEDURE GetPenMode(VAR mode : integer);
  68.      Valid Pen Modes:  patCopy, patXor   Example:  PenMode( patXor );
  69.  
  70.    PROCEDURE SetFont(font : integer);
  71.    PROCEDURE GetFont(VAR font : integer);
  72.      Valid Fonts:  FONT__SMALL, FONT__MEDIUM, FONT__LARGE, FONT__LARGEST
  73.      Example:  SetFont( FONT__LARGE );
  74.  
  75.  
  76. Shape Calls:
  77.  
  78.    PROCEDURE DrawLine(p1, p2 : Point);
  79.    PROCEDURE EraseLine(p1, p2 : Point);
  80.    PROCEDURE FrameRect(rectToFrame : Rect);
  81.    PROCEDURE PaintRect(rectToPaint : Rect);
  82.    PROCEDURE InvertRect(rectToInvert : Rect);
  83.    PROCEDURE EraseRect(rectToErase : Rect);
  84.    PROCEDURE FrameOval(ovalToFrame : Rect);
  85.    PROCEDURE PaintOval(ovalToPaint : Rect);
  86.    PROCEDURE InvertOval(ovalToInvert : Rect);
  87.    PROCEDURE EraseOval(ovalToErase : Rect);
  88.    PROCEDURE FrameArc(arcToFrame: Rect;  startAng, angSize : integer);
  89.    PROCEDURE PaintArc(arcToPaint: Rect;  startAng, angSize : integer);
  90.    PROCEDURE InvertArc(arcToInvert: Rect;  startAng, angSize : integer);
  91.    PROCEDURE EraseArc(arcToErase: Rect;  startAng, angSize : integer);
  92.    PROCEDURE PaintCircle(x, y, radius : inteer);
  93.    PROCEDURE FrameCircle(x, y, radius : inteer);
  94.    PROCEDURE EraseCircle(x, y, radius : inteer);
  95.  
  96.  
  97. Line Calls:
  98.    
  99.    PROCEDURE MoveTo(x, y : integer);
  100.    PROCEDURE LineTo(x, y : integer);
  101.  
  102.  
  103. Text Calls:
  104.  
  105.    PROCEDURE DrawString(str : string; x, y : integer);
  106.    PROCEDURE QueryStringSize(str : string; VAR width, height : integer);
  107.  
  108.  
  109. Initialization Notes:
  110.  
  111.    InitDraw creates the QuickDraw Window in which all of the other 
  112.       commands act.  If width and height are specified as 0 (zero), 
  113.       the size of the window will be specified by the user.  
  114.    ClearAll clears the QuickDraw display. 
  115.    DrawGrid draws a grid of specified spacing.  This is useful for
  116.       laying out graphics in the window.  
  117.    GetDrawingRect returns the size of the QuickDraw Window as a rect.  
  118.       This is useful in conjunction with the zero height/width option 
  119.       of InitDraw.  
  120.    QuitDraw closes the display created by the InitDraw call.
  121.  
  122.    
  123. Possible Errors:
  124.  
  125.    1) Call QuickDraw routines without InitDraw (initilizing).
  126.    2) Call QuitDraw when no InitDraw precedes it.
  127.    3) Try to REinitilize QuickDraw. (InitDraw in succession)
  128.    4) Try to use/create a Rect that is illegal.
  129.    5) Send bad paramaters to the Set procedures.
  130.  
  131.  
  132. See Also:       Pascal Keyword Help
  133.